using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._IntelligenceTools._Conversion
{
    /// <summary>
    /// <para>Batch Import Data</para>
    /// <para>Imports KML, KMZ, shapefiles, Excel worksheets, tabular text files, GeoJSON, and GPX files to feature classes stored in a single geodatabase.</para>
    /// <para>将 KML、KMZ、shapefile、Excel 工作表、表格文本文件、GeoJSON 和 GPX 文件导入到存储在单个地理数据库中的要素类。</para>
    /// </summary>    
    [DisplayName("Batch Import Data")]
    public class BatchImportData : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public BatchImportData()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_data">
        /// <para>Input Data</para>
        /// <para>The folders containing the data files or the data files to convert to geodatabase feature classes.</para>
        /// <para>包含要转换为地理数据库要素类的数据文件或数据文件的文件夹。</para>
        /// </param>
        /// <param name="_target_gdb">
        /// <para>Target Geodatabase</para>
        /// <para>The target geodatabase where output feature classes will be stored.</para>
        /// <para>将存储输出要素类的目标地理数据库。</para>
        /// </param>
        public BatchImportData(List<object> _in_data, object _target_gdb)
        {
            this._in_data = _in_data;
            this._target_gdb = _target_gdb;
        }
        public override string ToolboxName => "Intelligence Tools";

        public override string ToolName => "Batch Import Data";

        public override string CallName => "intelligence.BatchImportData";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_data, _target_gdb, _filter, _include_sub_folders.GetGPValue(), _out_geodatabase, _include_groundoverlay.GetGPValue()];

        /// <summary>
        /// <para>Input Data</para>
        /// <para>The folders containing the data files or the data files to convert to geodatabase feature classes.</para>
        /// <para>包含要转换为地理数据库要素类的数据文件或数据文件的文件夹。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Data")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _in_data { get; set; }


        /// <summary>
        /// <para>Target Geodatabase</para>
        /// <para>The target geodatabase where output feature classes will be stored.</para>
        /// <para>将存储输出要素类的目标地理数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_gdb { get; set; }


        /// <summary>
        /// <para>Filter</para>
        /// <para><xdoc>
        ///   <para>Applies a filter to limit which files are imported from folders. The following wildcard characters for the filter work on the full path to the input data:Multiple patterns can be added to the filter by separating each pattern with the vertical bar or pipe delimiter (|). Pattern comparisons are not case sensitive, so using the *airport.shp, *AIRPORT.SHP, or *Airport.shp pattern, for example, will import the same shapefile.
        ///   <bulletList>
        ///     <bullet_item>*—Match any character  </bullet_item><para/>
        ///     <bullet_item>?—Match a single character  </bullet_item><para/>
        ///     <bullet_item>[range]—Match a single character in the range  </bullet_item><para/>
        ///     <bullet_item>[!range]—Match any character not in the range  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        ///   <para>The following are filter examples:
        ///   <bulletList>
        ///     <bullet_item>To import all shapefiles, use *.shp.  </bullet_item><para/>
        ///     <bullet_item>To import all shapefiles and all .kml files, use *.shp|*.kml.  </bullet_item><para/>
        ///     <bullet_item>To import all files that have airport in the file path or file name, use *airport*.  </bullet_item><para/>
        ///     <bullet_item>To import all .geojson files that have airport in the file path or file name, use *airport*.geojson.  </bullet_item><para/>
        ///     <bullet_item>To import all .kmz files that have airport appended with any two characters in the name, use *airport??.kmz.  </bullet_item><para/>
        ///     <bullet_item>To import all files that have 1990 through 1997 in the file path or file name, use *199[0-7]*.  </bullet_item><para/>
        ///     <bullet_item>To import all shapefiles that have the exact folder name airfacilities in their file path, use *\airfacilities\*.shp.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>应用筛选器以限制从文件夹导入哪些文件。筛选器的以下通配符在输入数据的完整路径上起作用：通过使用竖线或竖线分隔符 （|） 分隔每个模式，可以将多个模式添加到筛选器中。模式比较不区分大小写，因此请使用 *airport.shp、*AIRPORT.例如，SHP 或 *Airport.shp 模式将导入相同的 shapefile。
        ///   <bulletList>
        ///     <bullet_item>*—匹配任何字符</bullet_item><para/>
        ///     <bullet_item>？—匹配单个字符</bullet_item><para/>
        ///     <bullet_item>[range] - 匹配范围内的单个字符</bullet_item><para/>
        ///     <bullet_item>[！range] - 匹配不在范围内的任何字符</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// <para>以下是筛选器示例：
        ///   <bulletList>
        ///     <bullet_item>要导入所有 shapefile，请使用 *.shp。</bullet_item><para/>
        ///     <bullet_item>要导入所有 shapefile 和所有 .kml 文件，请使用 *.shp|*.kml。</bullet_item><para/>
        ///     <bullet_item>要导入文件路径或文件名中包含 airport 的所有文件，请使用 *airport*。</bullet_item><para/>
        ///     <bullet_item>若要导入文件路径或文件名中包含 airport 的所有 .geojson 文件，请使用 *airport*.geojson。</bullet_item><para/>
        ///     <bullet_item>若要导入名称中附加了任意两个字符的 airport 的所有 .kmz 文件，请使用 *airport??.kmz。 </bullet_item><para/>
        ///     <bullet_item>若要导入文件路径或文件名中包含 1990 到 1997 的所有文件，请使用 *199[0-7]*。</bullet_item><para/>
        ///     <bullet_item>要导入文件路径中具有确切文件夹名称 airfacilities 的所有 shapefile，请使用 *\airfacilities\*.shp。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Filter")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _filter { get; set; } = null;


        /// <summary>
        /// <para>Include Sub Folders</para>
        /// <para><xdoc>
        ///   <para>Specifies whether subfolders will be recursively explored.
        ///   <bulletList>
        ///     <bullet_item>Checked—All subfolders will be explored. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Only the top-level folder will be explored.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否以递归方式浏览子文件夹。
        ///   <bulletList>
        ///     <bullet_item>选中 - 将浏览所有子文件夹。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 仅浏览顶级文件夹。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include Sub Folders")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _include_sub_folders_value _include_sub_folders { get; set; } = _include_sub_folders_value._true;

        public enum _include_sub_folders_value
        {
            /// <summary>
            /// <para>SUBFOLDERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SUBFOLDERS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_SUBFOLDERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_SUBFOLDERS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Geodatabase</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_geodatabase { get; set; }


        /// <summary>
        /// <para>Include Ground Overlay</para>
        /// <para><xdoc>
        ///   <para>Specifies whether KML or KMZ ground overlays (raster, air photos, and so on) will be included in the output.</para>
        ///   <para>Use caution if the KMZ points to a service that serves raster imagery. The tool will attempt to translate the raster imagery at all available scales. This process may be lengthy and possibly overwhelm the service.
        ///   <bulletList>
        ///     <bullet_item>Checked—Ground overlays will be included in the output. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Ground overlays will not be included in the output.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定输出中是否包括 KML 或 KMZ 地面叠加（栅格、航空照片等）。</para>
        /// <para>如果 KMZ 指向提供栅格影像的服务，请小心。该工具将尝试在所有可用比例下平移栅格影像。此过程可能很长，并且可能会使服务不堪重负。
        ///   <bulletList>
        ///     <bullet_item>选中 - 接地叠加将包含在输出中。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 接地叠加将不包括在输出中。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Include Ground Overlay")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _include_groundoverlay_value _include_groundoverlay { get; set; } = _include_groundoverlay_value._true;

        public enum _include_groundoverlay_value
        {
            /// <summary>
            /// <para>GROUNDOVERLAY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("GROUNDOVERLAY")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_GROUNDOVERLAY</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_GROUNDOVERLAY")]
            [GPEnumValue("false")]
            _false,

        }

        public BatchImportData SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}